from django.urls import path
from . import views

app_name = 'data_processing'

urlpatterns = [
    # 页面视图
    path('upload/', views.data_upload, name='data_upload'),
    path('generation/', views.data_generation, name='data_generation'),

    path('tasks/', views.task_list, name='task_list'),
    path('tasks/<int:task_id>/', views.task_detail, name='task_detail'),
    path('task-status/', views.task_status_view, name='task_status'),
    
    # API接口
    path('api/tasks/', views.TaskAPIView.as_view(), name='api_task_list'),
    path('api/tasks/<int:task_id>/', views.TaskAPIView.as_view(), name='api_task_detail'),
    path('api/tasks/<int:task_id>/cancel/', views.cancel_task, name='api_cancel_task'),
    path('api/tasks/<int:task_id>/retry/', views.retry_task, name='api_retry_task'),
]